package com.uniview.base;

import org.apache.log4j.Logger;


public class BaseDataSource extends
		org.logicalcobwebs.proxool.ProxoolDataSource {

	private Logger log = Logger.getLogger(BaseDataSource.class);

	/**
	 * 解密数据库用户名
	 */
	@Override
	public void setUser(String user) {
		try {
			super.setUser(user);
			//user = DESUtil.decrypt(user);
			//super.setUser(user);
		} catch (Exception er) {
			log.error("解密数据库用户异常", er);
		}
	}

	@Override
	public String getUser() {
		return super.getUser();
	}

	/**
	 * 解密数据库密码
	 */
	@Override
	public void setPassword(String pwd) {
		try {
			super.setPassword(pwd);
			//pwd = DESUtil.decrypt(pwd);
			//super.setPassword(pwd);
		} catch (Exception er) {
			log.error("解密数据库密码异常", er);
		}
	}

	@Override
	public String getPassword() {
		return super.getPassword();
	}

}
